//
//  network.h
//  ChatRoom
//
//  Created by lee han on 12/10/12.
//  Copyright (c) 2012 lee han. All rights reserved.
//
#pragma once

#import <Foundation/Foundation.h>
#import "ASIHTTPRequest.h"
#import "networkDefine.h"

@protocol networkDelegate <NSObject>

@optional
- (void)parserResult:(NSDictionary*)response functionType:(NSInteger)type;
@end

@interface network : NSObject<ASIHTTPRequestDelegate>


+(network*)sharedInstance;

/*
 //发送http请求接口
 @param data     需要发送的数据
 @param type     消息类型
 */
- (void)startHttpRequest:(id<networkDelegate>) del Data:(NSMutableDictionary*)data functionType:(NSInteger)type;

//同步同求
- (void)startSynchronousHttpRequest:(id<networkDelegate>) del Data:(NSMutableDictionary*)data functionType:(NSInteger)type;

@end
